/**
 * Copyright (C) 2018-2020
 * All rights reserved, Designed By www.gzchengguo.cn

 */
package link.chengguo.orangemall.modules.order.service;

import link.chengguo.orangemall.common.service.BaseService;

import link.chengguo.orangemall.modules.cart.vo.OrangeStoreCartQueryVo;
import link.chengguo.orangemall.modules.order.domain.OrangeStoreOrderCartInfo;
import link.chengguo.orangemall.modules.order.service.dto.OrangeStoreOrderCartInfoDto;
import link.chengguo.orangemall.modules.order.service.dto.OrangeStoreOrderCartInfoQueryCriteria;
import org.springframework.data.domain.Pageable;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
import java.util.Map;

/**
* @author chengguo
* @date 2020-05-12
*/
public interface OrangeStoreOrderCartInfoService extends BaseService<OrangeStoreOrderCartInfo> {

    /**
     * 添加购物车商品信息
     * @param oid 订单id
     * @param cartInfo 购物车信息
     */
    void saveCartInfo(Long oid, List<OrangeStoreCartQueryVo> cartInfo);

    OrangeStoreOrderCartInfo findByUni(String unique);


    /**
    * 查询数据分页
    * @param criteria 条件
    * @param pageable 分页参数
    * @return Map<String,Object>
    */
    Map<String,Object> queryAll(OrangeStoreOrderCartInfoQueryCriteria criteria, Pageable pageable);

    /**
    * 查询所有数据不分页
    * @param criteria 条件参数
    * @return List<OrangeStoreOrderCartInfoDto>
    */
    List<OrangeStoreOrderCartInfo> queryAll(OrangeStoreOrderCartInfoQueryCriteria criteria);

    /**
    * 导出数据
    * @param all 待导出的数据
    * @param response /
    * @throws IOException /
    */
    void download(List<OrangeStoreOrderCartInfoDto> all, HttpServletResponse response) throws IOException;
}
